﻿<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="InfoList.ascx.cs"
    Inherits="ZF.WS.UserControls.House.InfoList" %>
<div class="ct1 content">
    <div class="board info mt10_">
        <dl>
            <dt><a href="/info/list.aspx" class="t">分类信息</a>
                <zf:ListView runat="server" ID="lvInfoTitle">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <a href="/info/list.aspx?id=<%#Eval("Key") %>" class="<%# Container.DataItemIndex==0?"active":"dn_" %> slide"
                            bind="infotype<%# Container.DataItemIndex %>">
                            <%#Eval("Text") %></a>
                    </ItemTemplate>
                </zf:ListView>
                <a href="/info/list.aspx" class="more">更多>>></a> </dt>
            <zf:ListView runat="server" ID="lvInfoList">
                <LayoutTemplate>
                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                    </zf:PlaceHolder>
                </LayoutTemplate>
                <ItemTemplate>
                    <dd class="slide infotype<%# Container.DataItemIndex %> <%# Container.DataItemIndex==0?"active":"dn_" %>">
                        <zf:ListView runat="server" DataSource='<%#Eval("Value") %>'>
                            <LayoutTemplate>
                                <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                </zf:PlaceHolder>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <table class="w100_ ">
                                    <tr>
                                        <td class="t1">
                                            <p class="p1">
                                                <a href="/info/view.aspx?id=<%#Eval("Info.InfoId") %>">
                                                    <%#Eval("Info.Title") %></a>&nbsp;<span style="color: #A651A6">(<%#Eval("City") %>)</span></p>
                                            <p class="p2">
                                            
                                                <%# string.Concat( Eval("PCtn") ).MaxLength(50)%></p>
                                        </td>
                                        <td class="t2">
                                            
                                            <%#Eval("Price") %>
                                        </td>
                                        <td class="t3">
                                            <%# ((DateTime)Eval("Info.AddTime")).ToShortDateString()%>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </zf:ListView>
                    </dd>
                </ItemTemplate>
            </zf:ListView>
        </dl>
    </div>
    <div class="lrcontent ml10_ mt10_">
        <div class="board infosearch lrsearch">
            <dl>
                <dt><span>信息搜索</span> <a href="/info/pub.aspx" class="more" style="width:120px">免费发布分类信息</a></dt>
                <dd>
                    <% var sp = new ZF.WS.house.Search(); %>
                    <table class="w100_  ">
                        <tr>
                            <td class='t'>
                                区域:
                            </td>
                            <td class='c'>
                                <select class="ddl at">
                                    <option value="0">不 限</option>
                                    <%foreach (var t in sp.City)
                                      { %>
                                    <option value="<%=t.AreaId %>">
                                        <%=t.Name %></option>
                                    <%} %>
                                </select>

                                <script>
                                    $(".infosearch select.at").change(function() {
 
                                        $(".infosearch .tdca select").hide();
                                        $("#paid" + this.value).show();
                                        
                                    });
                                </script>

                            </td>
                        </tr>
                        <%--<tr>
                            <td class='t'>
                                商圈:
                            </td>
                            <td class='c tdca'>
                                <select class="ddl" paid="0">
                                    <option value="0">不 限&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                </select>
                                <%foreach (var area in sp.AreaChilds)
                                  { %>
                                <select class="ddl dn_" paid="<%=area.Id %>" id="paid<%=area.Id %>">
                                    <option value="0">不 限</option>
                                    <%foreach (var a in area.Childs)
                                      { %>
                                    <option value="<%=a.Id %>">
                                        <%=a.Name%></option>
                                    <%} %>
                                </select>
                                <%} %>
                            </td>
                        </tr>--%>
                        <tr class="dt">
                            <td class='t'>
                                信息类型:
                            </td>
                            <td class='c'>
                                <select class="ddl it">
                                    <option value="0">不限</option>
                                    <zf:ListView runat="server" ID="lvInfoTitle1">
                                        <LayoutTemplate>
                                            <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                            </zf:PlaceHolder>
                                        </LayoutTemplate>
                                        <ItemTemplate>
                                            <option value="<%#Eval("Key") %>">
                                                <%#Eval("Text") %></option>
                                        </ItemTemplate>
                                    </zf:ListView>
                                </select>
                            </td>
                        </tr>
                        <tr class="dn_">
                            <td class='t'>
                                价格范围:
                            </td>
                            <td class='c'>
                                <input type="text" class="sstxt pmin" />-<input type="text" class="sstxt pmax" />
                            </td>
                        </tr>
                        <tr class="dn_">
                            <td class='t'>
                                发布时间:
                            </td>
                            <td class='c'>
                                <select class="ddl days">
                                    <option value="0">不限</option>
                                    <option value="3">三天以内</option>
                                    <option value="7">七天以内</option>
                                    <option value="15">半个月以内</option>
                                    <option value="3">一个月以内</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class='t'>
                                关键字:
                            </td>
                            <td class='c'>
                                <input type="text" class="stxt key" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: center">
                                <input type="button" value=" 搜 索 " class="btSearch" />
                            </td>
                        </tr>
                    </table>
                </dd>
            </dl>
        </div>

        <script>
            $(function() {
                var infosearch = $(".infosearch");
                infosearch.find(".btSearch").click(function() {
                    var param = "1=1";
                    if (infosearch.find(".at")[0].value != "0")
                        param += "&aid1=" + infosearch.find(".at")[0].value;
                    if (infosearch.find("#paid" + infosearch.find(".at")[0].value)) {
                        param += "&aid2=" + infosearch.find("#paid" + infosearch.find(".at")[0].value)[0].value;
                    }

                    if (infosearch.find(".it")[0].value != "0")
                        param += "&id=" + infosearch.find(".it")[0].value;
                    if ($.trim(infosearch.find(".pmin").val()) != "")
                        param += "&pmin=" + $.trim(infosearch.find(".pmin").val());
                    if ($.trim(infosearch.find(".pmax").val()) != "")
                        param += "&pmax=" + $.trim(infosearch.find(".pmax").val());
                    if (infosearch.find(".days")[0].value != "0")
                        param += "&days=" + infosearch.find(".days")[0].value;
                    if ($.trim(infosearch.find(".key").val()) != "")
                        param += "&key=" + escape(infosearch.find(".key").val());

                    window.location = "/info/list.aspx?" + param;

                });
            });
        </script>
<style>
.artlist1 dl dd{ height:24px; line-height:24px;}
</style>
        <div class="board   artlist mt5_ artlist1">
            <dl>
                <dt><a  href="/info/lFitup.aspx?tid=1" >装修日志</a> <a href="/info/pfitup.aspx?tid=1"   class="more" style="width: 100px;">发布装修日志</a> </dt>
                <zf:ListView runat="server" ID="lvFitup">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                         
                            <dd>
                            <a href="/info/fitup.aspx?id=<%#Eval("FitupId")%>&tid=<%#Eval("TypeId")%>">
                                <%# ((string)Eval("Title")).MaxLength(16) %></a></dd>
                    </ItemTemplate>
                </zf:ListView>
   
            </dl>
             
        </div>
        
        <div class="board mt5_ itlist dn_">
            <dl>
                <dt><span>热门分类信息</span></dt>
                <dd>
                    <ul>
                        <zf:ListView runat="server" ID="lvHot">
                            <LayoutTemplate>
                                <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                </zf:PlaceHolder>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <li><a href="/info/list.aspx?id=<%#Eval("Key") %>">
                                    <%#Eval("Text") %></a> </li>
                            </ItemTemplate>
                        </zf:ListView>
                    </ul>
                </dd>
            </dl>
        </div>
        <%--<div class="ads mt5_">
            <a href="/service/oyzx.aspx">
                <img src="/image/jx.gif" class="cp_ " style="height: 68px; cursor: pointer" />
            </a>
        </div>--%>
    </div>
    <div class="fc_">
    </div>
</div>
